package com.kaili.db.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.kaili.pojo.entity.BaseDict;
import com.kaili.pojo.entity.HsOptEwb;
import com.kaili.pojo.entity.RewbBean;
import com.kaili.pojo.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Mapper 接口
 *
 * @author cgm
 * @since 2018-05-08
 */
@Mapper
public interface HsOptEwbMapper extends BaseMapper<HsOptEwb> {

    List<EwbQueryVO> queryEwbList(Pagination page, Map search);

    EwbSummaryVO queryEwbSummary(Map search);

    List<EwbQueryVO> queryEwbList(Map search);

    List<EwbQueryVO> queryEwbListByStowageNo(Map search);

    List<EwbQueryVO> queryUnLoadingEwbList(Map search);

    List<DailyDeliveryStatisticsVO> queryStatistics(Map search);

    List<DailyDeliveryEwbVO> queryDailyDeliveryEwbList(Pagination page, Map search);

    List<ServiceReportVO> queryServiceStatistics(Pagination page, Map search);

    void callEwbInputFinProduce(Map map);

    Integer getInfoByEwbNo(Map map);

    Integer getInfoByEwbNoCount(Map map);

    Integer selectCompanyId(Integer siteId);

    Double selectMaxVolume(String companyId);

    Double selecthighVolume(@Param("ewbNo") String ewbNo, @Param("dateTime") Date dateTime);

    Integer selectDriver(String operationId);

    int updateBatch(Map search);

    List<Map<String, Object>> selectSettleMethod();

    List<Map<String, Object>> selectPayMethod();

    List<BaseDict> selectDict();

    int addCustomer(CustomerVO customer);

    String getMaxCustomerCode();

    //判断寄送网点是否为签收网点
    Integer getSenIsSignSite(RewbBean rewbBean);

    //判断验收网点和返厂网点是否为寄件网点
    Integer acceptancceNetwork(RewbBean rewbBean);

}
